<template>
  <div class="userInfo">
    <div class="nav-row">
      <div class="close-content" @click.stop="goBack">
        <span class="icon iconfont close">&#xe748;</span>
      </div>
    </div>

    <div class="u-page">
      <div class="user-avatar-content">
        <div class="user-avatar">
          <!----><img
            class="user-avatar-img"
            src="/static/img/main/32.webp"
            draggable="false"
          />
          <div class="camera-content"></div>
        </div>
      </div>
      <div class="set-row">
        <van-field
          v-model="userName"
          clearable
          label="Username"
          right-icon="edit"
          input-align="right"
        />
      </div>

      <div class="set-row">
        <van-field
          v-model="email"
          clearable
          label="Email"
          disabled 
          input-align="right"
        />
      </div>

      <div class="set-row">
        <van-field
          v-model="vip"
          clearable
          label="VIP Level"
          disabled 
          input-align="right"
        />
      </div>

      <div class="btn-item">SAVE</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "setting",
  data() {
    return {
      userName: "test",
      vip:"VIP1",
      email:"dddd@giaml.com"
    };
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    },
    goToAgree(item) {
      this.$router.push({
        name: "agreement",
        query: {
          id: item.id,
          title: item.title,
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.userInfo {
  box-sizing: border-box;
  .nav-row {
    height: 44px;
    padding: 0 10px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: calc(0px);
    .close-content {
      width: 30px;
      height: 40px;
      display: flex;
      justify-content: center;
      align-items: center;
      .close {
        color: var(--text-color);
        font-size: 22px;
        font-weight: 500;
      }
    }
  }

  .u-page {
    padding: 33px 11px;
    .user-avatar-content {
      width: 100%;
      height: 165px;
      display: flex;
      justify-content: center;
      align-items: center;
      .user-avatar {
        width: 104px;
        height: 104px;
        border-radius: 100%;
        font-size: 0;
        position: relative;
        .user-avatar-img {
          width: 100%;
          height: 100%;
          border-radius: 100%;
        }
        .camera-content {
          width: 38px;
          height: 38px;
          border-radius: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
          position: absolute;
          bottom: 0;
          right: 0;
          background-color: #5a5b64;
        }
      }
    }

    .set-row {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      height: 60px;
      background-color: var(--content-bc);
      padding: 0 11px;
      box-sizing: border-box;
      border-radius: 7px;
      margin-bottom: 11px;
    }

    .btn-item {
      width: 100%;
      height: 50px;
      background: #00dcab;
      border-radius: 7px;
      margin-top: 66px;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 17px;
      font-weight: 400;
      color: #fff;
    }
  }
}
</style>

<style lang="scss">
.userInfo {
    .van-cell {
         background-color: var(--content-bc);
    }
    .van-field__label {
        color: var(--text-color);
    }
    .van-field__control {
        color: var(--text-color);
        color: grey;
    }
}
</style>